Skip to content

fix: hold delegate reference to keep it from being deallocated #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

spikecurtis
Copy link
Collaborator

@spikecurtis spikecurtis commented Jan 21, 2025

The problem we were having before was being caused by the system extension delegate being deallocated before the request responses came back.

I didn't initially realize this, but the OSSystemRequest.delegate is a weak reference (you have to click down to the individual field view in the docs to learn this).

So, we keep a strong reference from the VPNService around while we are waiting for the extension to install.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis marked this pull request as ready for review January 21, 2025 06:15
Copy link
Member

@ethanndickson ethanndickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Collaborator Author

spikecurtis commented Jan 21, 2025

Merge activity

  • Jan 21, 1:48 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 21, 1:48 AM EST: Graphite couldn't merge this PR because it failed optional checks and "ignore optional checks" was not selected.
  • Jan 21, 5:05 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 21, 5:05 AM EST: A user merged this pull request with Graphite.

@spikecurtis spikecurtis force-pushed the spike/fix-sys-extn-delegate branch from 62199d8 to 33294fa Compare January 21, 2025 08:18
@spikecurtis spikecurtis merged commit 962c369 into main Jan 21, 2025
4 checks passed
@ethanndickson ethanndickson deleted the spike/fix-sys-extn-delegate branch January 23, 2025 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants